package se.sics.kompics.tutorial.tutorial2;

import se.sics.kompics.launch.Scenario;
import se.sics.kompics.launch.Topology;

public final class Executor {
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Topology topology1 = new Topology()
		{
			private static final long serialVersionUID = 5917842835397017771L;

			{
				node(1, "127.0.0.1", 22031);
				node(2, "127.0.0.1", 22032);
				node(3, "127.0.0.1", 22033);
				node(4, "127.0.0.1", 22034);
				node(5, "127.0.0.1", 22035);
				node(6, "127.0.0.1", 22036);
				node(7, "127.0.0.1", 22037);
				node(8, "127.0.0.1", 22038);
				node(9, "127.0.0.1", 22039);
				defaultLinks(1000, 0.2);
			}
		};
		
		Scenario scenario1 = new Scenario(Main.class) {
			{
				command(1, "Bmsg1");
				command(2, "Bmsg2");
				command(3, "Bmsg3");
				command(4, "Bmsg4");
				command(5, "Bmsg5");
				command(6, "Bmsg6");
				command(7, "Bmsg7");
				command(8, "Bmsg8");
				command(9, "Bmsg9");
			}
		};
		
		scenario1.executeOn(topology1);
		System.exit(0);
	}

}
